package action.common;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import dao.common.JobSituationDao;
import model.common.JobSituation;

public class JobsituationAction {
	
	private JobSituation js;

	public void add(JobSituation js) throws Exception{
		JobSituationDao dao=new JobSituationDao();
		dao.addJobSituation(js);
	}
	
	public void get(Integer employeeId) throws Exception{
		JobSituationDao dao=new JobSituationDao();		
		dao.get(employeeId);
	}
	
	public void edit(JobSituation js) throws SQLException{
		JobSituationDao dao=new JobSituationDao();		
		dao.updateJobSituation(js);
	}
	
	public void del(Integer employeeId) throws SQLException{
		JobSituationDao dao=new JobSituationDao();		
		dao.deleteJobSituation(employeeId);
	}
	
	public List<JobSituation> query(List<Map<String, Object>> params) throws Exception{
		JobSituationDao dao=new JobSituationDao();	
		
		return dao.query(params);
		
	}
	
	public List<JobSituation> query(String employeeName,String employeeAge ) throws Exception{
		JobSituationDao dao=new JobSituationDao();	
		return dao.query(employeeName, employeeAge);
		
	}

}
